Revert "objtool: Fix CONFIG_STACK_VALIDATION=y warning for out-of-tree modules"
authorBen Hutchings <ben@decadent.org.uk>
Sun, 14 Jan 2018 19:27:18 +0000 (19:27 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Fri, 15 Mar 2019 02:16:04 +0000 (02:16 +0000)
This reverts commit 9f0c18aec620bc9d82268b3cb937568dd07b43ff.  This
check doesn't make sense for OOT modules as they should always use
a pre-built objtool.

Gbp-Pq: Topic debian
Gbp-Pq: Name revert-objtool-fix-config_stack_validation-y-warning.patch

Makefile

index b87fbc02a6724eadc55e028423454a3bb630c4ac..1aa7fdfbbb83bd182a106cf27bc9e5dfbc489252 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -949,17 +949,6 @@ mod_sign_cmd = true
 endif
 export mod_sign_cmd
 
-ifdef CONFIG_STACK_VALIDATION
-  has_libelf := $(call try-run,\
-               echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0)
-  ifeq ($(has_libelf),1)
-    objtool_target := tools/objtool FORCE
-  else
-    SKIP_STACK_VALIDATION := 1
-    export SKIP_STACK_VALIDATION
-  endif
-endif
-
 
 ifeq ($(KBUILD_EXTMOD),)
 core-y         += kernel/ certs/ mm/ fs/ ipc/ security/ crypto/ block/
@@ -1110,6 +1099,17 @@ uapi-asm-generic:
        $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \
                    src=uapi/asm obj=arch/$(SRCARCH)/include/generated/uapi/asm
 
+ifdef CONFIG_STACK_VALIDATION
+  has_libelf := $(call try-run,\
+               echo "int main() {}" | $(HOSTCC) -xc -o /dev/null -lelf -,1,0)
+  ifeq ($(has_libelf),1)
+    objtool_target := tools/objtool FORCE
+  else
+    SKIP_STACK_VALIDATION := 1
+    export SKIP_STACK_VALIDATION
+  endif
+endif
+
 PHONY += prepare-objtool
 prepare-objtool: $(objtool_target)
 ifeq ($(SKIP_STACK_VALIDATION),1)